1. Technical Field
The present invention relates to an image compressing apparatus and an image compressing method for compressing an image, an image decompressing apparatus and an image decompressing method for decompressing a compressed image, an image forming apparatus, and a recording medium.
2. Description of Related Art
Apparatuses having a printing function, such as those referred to as a monofunctional printer or a multifunctional printer, have been widely used. Such a printing apparatus generally receives image information for forming an output image from an external personal computer (hereafter referred to as a PC) or the like via a wired or wireless communication path, forms an output image by performing conversion process suited for the apparatus itself and prints the image on paper. Furthermore, generally speaking, the printing apparatus receives image information from an external device in a format referred to as PDL (a page description language) or in a specific format, i.e., in a format represented by a form close to that of the output image peculiar to the apparatus.
The PDL format is a format defined to provide versatility so that printing can be accomplished by various printers without causing the user to be aware of the characteristics of the printing apparatuses as much as possible. As an example of PDL, PostScript developed by Adobe Systems Incorporated is available for example. On the other hand, such a specific format is frequently used to reduce the load on the side of a printing apparatus or on the side of an image information sender although versatility is reduced, and various specific formats are available.
The following will explain process for receiving PDL data written in PDL and performing printing by a conventional printer. FIG. 1 is a block diagram showing the internal configuration of the conventional printer. The conventional printer 501 transmits and receives information to and from an external PC 500 via a wired or wireless communication path 500a, such as a USB (universal serial bus) cable or a wireless LAN (local area network).
The printer 501 obtains PDL data (image information) from the external PC 500 via the communication path 500a. The PDL data input to the printer 501 is subjected to RIP process by an RIP (raster image processor) process section 502. In the RIP process, the input PDL data is interpreted according to PDL language specifications and continuous tone bit map image data is generated. Since a print output format conversion process section 503 performs pseudo tone reproduction using density gradation that can be reproduced by a print engine 504, the continuous tone bit map image data is subjected to tone reproduction process using image process, such as a dither method and an error diffusion method and then converted into halftone bit map image data.
The halftone bit map image data is input to the print engine 504 equipped with an electrophotographic type or ink-jet type printing section. The print engine 504 performs printing on paper according to the input halftone bit map image data. The RIP process section 502 and the print output format conversion process section 503 are constituted by a processor or an ASIC (application specific integrated circuit) (both are not shown) mounted in the printer 501 or a combination of these, for example.
Some type of the printer 501 is configured so that a plurality of print outputs can be performed for the same PDL data. The printer 501 capable of performing a plurality of print outputs stores image data therein in any one of image formats, such as a format received from the external PC 500, an intermediate format obtained by converting the received format or a format according to a final output image format. In addition, the printer 501 performs a plurality of print outputs using the stored image data, thereby attaining a function capable of performing a plurality of print outputs using image data obtained by performing input process once.
On storing image data in the format received from the external PC 500, the amount of process at the time of the reception is small, but the amount of process at the time of printing is large. On the other hand, on storing image data in the format according to the final output image format, the amount of process at the time of the reception is large, but the amount of process at the time of printing is small. On storing image data in the intermediate format, the amount of process is intermediate therebetween. In order to shorten the time required to perform a plurality of print outputs, it is efficient to perform the process of the RIP process section 502 and the print output format conversion process section 503 only once and to store and reuse the result in the format according to the final output image format.
In addition, on storing image data in the format according to the intermediate format or the final output image format, a data storage capacity per page is generally reduced by data compression. This is based on the facts that the amount of image data to be printed out is generally large and that when the image data is bit map data, a relatively large compression rate can be expected. Hence, it is frequently advantageous that system loads, such as the data storage capacity and bus bandwidth, increasing when the image data is processed without compression, can be reduced, even in consideration of the overhead for data compression and data decompression.
FIG. 2 is a block diagram showing the internal configuration of another conventional printer. Components similar to those shown in FIG. 1 are designated by the same numerals and their descriptions are omitted. When the printer 501 shown in FIG. 1 stores image data therein on performing a plurality of print outputs for the same PDL data, the configuration shown in FIG. 2 in which halftone bit map image data is compressed and stored is used efficiently.
In the printer 501 shown in FIG. 2, a halftone image compressor 505 compresses the halftone bit map image data that has been converted from the continuous tone bit map image data by the print output format conversion process section 503. The compressed image data is stored in a storage section 506 constituted by a hard disk or a flash ROM (read only memory). The compressed image data stored in the storage section 506 is decompressed by a halftone image decompressor 507, returned to the halftone bit map image data and input to the print engine 504.
Since the halftone image compressor 505 and the halftone image decompressor 507 are used to process halftone images, an image compressing method being effective in compressing halftone images is used. An example to be used is JBIG (a binary image lossless compression method decided by Joint Bi-level Image Experts Group, ITU-T recommendation T.82) or JBIG2 (a compression method for lossless compression or lossy compression for images ranging from binary images to multilevel images, decided by Joint Bi-level Image Experts Group 2, ITU-T recommendation T.88), recommended by Telecommunication Standardization Sector (ITU-T) of ITU (International Telecommunication Union).
Furthermore, some type of the printer 501 (a multifunctional printer) is configured so as to be able to perform print output, external output, facsimile transmission (hereafter referred to as FAX transmission), etc. for image data stored inside the printer 501 according to the user's request so that the image data can be reused. FIG. 3 is a block diagram showing the internal configuration of still another conventional printer. Components similar to those shown in FIGS. 1 and 2 are designated by the same numerals and their descriptions are omitted.
As shown in FIG. 3, since the printer 501 capable of performing plural types of process for the stored image data has a plurality of output destinations to which the stored image data is output, it is preferable that the image data is stored in an intermediate format so that the image data can be converted into various kinds of formats depending on output destination. FIG. 3 shows a configuration in which continuous tone bit map image data is compressed and stored. In other words, in the printer 501 shown in FIG. 3, the continuous tone bit map image data generated from the PDL data by the RIP process section 502 is compressed by a continuous tone image compressor 508 and then stored in the storage section 506.
The compressed image data stored in the storage section 506 is decompressed by a continuous tone image decompressor 509 and returned to the continuous tone bit map image data and then input to any one of the print output format conversion process section 503, a JPEG format conversion process section 510 and a FAX format conversion process section 512. More specifically, when the user requests printing through the operation section (not shown) of the printer 501, the continuous tone bit map image data is input to the print output format conversion process section 503. In addition, when the user requests image transmission in the JPEG (an image compression method for lossy compression or lossless compression of multilevel images, decided by Joint Photographic Experts Group, ITU-T recommendation T.81) format, the continuous tone bit map image data is input to the JPEG format conversion process section 510. Furthermore, when the user requests FAX transmission, the continuous tone bit map image data is input to the FAX format conversion process section 512.
The continuous tone bit map image data input to the print output format conversion process section 503 is converted into halftone bit map image data by the print output format conversion process section 503 and printed out onto paper by the print engine 504. The continuous tone bit map image data input to the JPEG format conversion process section 510 is converted into JPEG image data by the JPEG format conversion process section 510 and is transmitted to a destination via a network transmission section 511 capable of performing communication with an external network. The continuous tone bit map image data input to the FAX format conversion process section 512 is converted into FAX transmission format image data by the FAX format conversion process section 512 and is transmitted to a destination via a FAX transmission section 513 that has an interface for FAX and a communication function.
The JPEG format conversion process section 510 and the FAX format conversion process section 512 are constituted by a processor or an ASIC mounted in the printer 501 or a combination of these, for example.
The halftone bit map image data for print output, the JPEG image data for image transmission and the FAX transmission format image data for FAX transmission are different from each other in format. Hence, when the respective formats of image data are created in advance and stored inside the printer 501, the required process capability and the amount of data to be created increase. Furthermore, when either format of image data is stored inside the printer 501 and reused after format conversion, image quality is degraded.
Hence, the configuration in which image data of the continuous tone bit map format serving as an intermediate format convertible into any format is compressed and stored as shown in FIG. 3, instead of storing the image data in the respective formats, is convenient in view of process capability, the amount of data and data management. However, when the continuous tone image compressor 508 compresses the continuous tone bit map image data completely by performing lossless compression process, the rate of the compression is limited depending on the continuous tone bit map image data, and only a compression rate limited to some extent is obtained, although no difference occurs in image quality between before and after the image compression.
In recent years, various kinds of methods have been proposed as image compression methods for multilevel images. Examples of the methods include lossless compression methods that use one-dimensional auto-correlation, such as a compression method based on the run-length method, the LZW method based on the Lempel-Ziv method serving as a lexicographic compression method, and the DEFLATE method. Furthermore, the ITU-T Recommendation stipulates the JPEG lossy compression method based on DCT (discrete cosine transform), including image compression method information for reference to the definition of the image decompressing method. Moreover, Lossless JPEG (ITU-T Recommendation T.81, Annex H) stipulates a lossless compression method based on two-dimensional DPCM (differential pulse code modulation). Still further, JPEG-LS (ITU-T Recommendation T.87) and JPEG 2000 (ITU-T Recommendation T.800) respectively stipulate a lossless compression method and a lossy compression method in which methods different from each other are used. These methods are used widely.
Some types of apparatuses, such as a digital copier and a multifunctional printer, have a scanner function for optically reading a document placed on a document table and generating digital image data of the read image. Since this type of apparatus reads the document optically, the digital image data contains noise and errors caused by a light source and a reading device. Furthermore, since the optical resolution is limited, edges and the like cannot be reproduced, and the digital image data generated by the scanner function cannot reproduce the document completely. For this reason, when an image generated using the scanner function is compressed, the lossy compression method defined in JPEG or JPEG 2000 is generally used frequently.
On the other hand, various kinds of image data, such as text images of texts, characters and the like, vector images, such as ruled lines and graphics in graphs, and photograph images in which image data taken using a digital camera or the like are pasted partly, are mixed in continuous tone bit map image data that is generated electronically from PDL data using a method, such as the RIP process. Among the various kinds of image data, text images and vector images generally have relatively small numbers of colors and gray scales. Since the resolution of the visual sense of the human is high in low gray scales, blurs at edges caused by lossy compression are easily recognized as degradation in image quality. Hence, text images and vector images should not be subjected to lossy compression if possible. Furthermore, since text images and vector images generally have small numbers of colors, the compression rates can be improved easily even when lossless compression is performed.
Moreover, since photograph images, such as originally image-sensed images, represented using relatively large numbers of colors and gray scales have a large number of colors, when such images are subjected to lossless compression, the compression rates thereof are not expected to be improved. However, the resolution of the visual sense of the human is low in multiple gray scales, and some differences in photograph images cannot be distinguished. Hence, photograph images are suited for lossy compression that can further reduce the amount of data although the compression is lossy compression. For this reason, with respect to continuous tone bit map image data, it can be expected that the image quality equivalent to that obtained before the compression can be maintained by using lossless compression and lossy compression in combination, while the compression rate is improved.
For example, a method has been proposed in which a color image is segmented into plural kinds of portions, such as text portions and halftone portions or texts, graphics and images, and the respective portions are subjected to appropriate encoding process (image compression) (refer to Japanese Patent Application Laid-open No. H03-104380 (1991) and Japanese Patent Application Laid-open No. 2000-184205). In addition, an apparatus has been proposed in which input image data is segmented into areas having different numbers of gray scales, and one area is encoded using a reversible encoding method and the other is encoded using irreversible encoding method (refer to Japanese Patent Application Laid-open No. 2003-158739).